/*
 * QFontSet.cpp  0.4.0 / Nov 17, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
#include "QFontSet.h"

// QFontSet :: Public Constructors. --------------------------------------------

/*!
 * \brief Constructs new QFontSet object.
 */
QFontSet::QFontSet()
  : m_defaultFont(QApplication::font()),
    m_fixedFont(QApplication::font("QTextArea")),
    m_componentFont(QApplication::font("QWidget")),
    m_buttonFont(QApplication::font("QAbstractButton")),
    m_menuFont(QApplication::font("QMenu")),
    m_menuBarFont(QApplication::font("QMenuBar")),
    m_textFont(QApplication::font("QLabel")),
    m_toolTipFont(QApplication::font("QTipLabel"))
{
  // empty body
}

/*!
 * \brief Constructs new QFontSet object.
 *
 * \param defaultFont the default font
 * \param fixedFont the fixed font
 */
QFontSet::QFontSet(const QFont &defaultFont, const QFont &fixedFont)
  : m_defaultFont(defaultFont), m_fixedFont(fixedFont),
    m_componentFont(defaultFont), m_buttonFont(defaultFont),
    m_menuFont(defaultFont), m_menuBarFont(defaultFont),
    m_textFont(defaultFont), m_toolTipFont(defaultFont)
{
  // empty body
}

/*!
 * \brief Copy constructor.
 *
 * \param fontSet the font set
 */
QFontSet::QFontSet(const QFontSet &fontSet)
  : m_defaultFont(fontSet.m_defaultFont),
    m_fixedFont(fontSet.m_componentFont),
    m_componentFont(fontSet.m_componentFont),
    m_buttonFont(fontSet.m_buttonFont),
    m_menuFont(fontSet.m_menuFont),
    m_menuBarFont(fontSet.m_menuBarFont),
    m_textFont(fontSet.m_textFont),
    m_toolTipFont(fontSet.m_toolTipFont)
{
  // empty body
}

// QFontSet :: Public Member Functions. ----------------------------------------

/*!
 * \brief Returns the default font.
 *
 * \return the default font
 */
const QFont &QFontSet::defaultFont() const
{
  return m_defaultFont;
}

/*!
 * \brief Sets the default font.
 *
 * \param font the default font
 */
void QFontSet::setDefaultFont(const QFont &font)
{
  m_defaultFont = font;
}

/*!
 * \brief Returns the fixed font.
 *
 * \return the fixed font
 */
const QFont &QFontSet::fixedFont() const
{
  return m_fixedFont;
}

/*!
 * \brief Sets the fixed font.
 *
 * \param font the fixed font
 */
void QFontSet::setFixedFont(const QFont &font)
{
  m_fixedFont = font;
}

/*!
 * \brief Returns the component font.
 *
 * \return the component font
 */
const QFont &QFontSet::componentFont() const
{
  return m_componentFont;
}

/*!
 * \brief Sets the component font.
 *
 * \param font the component font
 */
void QFontSet::setComponentFont(const QFont &font)
{
  m_componentFont = font;
}

/*!
 * \brief Returns the button font.
 *
 * \return the button font
 */
const QFont &QFontSet::buttonFont() const
{
  return m_buttonFont;
}

/*!
 * \brief Sets the button font.
 *
 * \param font the button font
 */
void QFontSet::setButtonFont(const QFont &font)
{
  m_buttonFont = font;
}

/*!
 * \brief Returns the menu font.
 *
 * \return the menu font
 */
const QFont &QFontSet::menuFont() const
{
  return m_menuFont;
}

/*!
 * \brief Sets the menu font.
 *
 * \param font the menu font
 */
void QFontSet::setMenuFont(const QFont &font)
{
  m_menuFont = font;
}

/*!
 * \brief Returns the menu bar font.
 *
 * \return the menu bar font
 */
const QFont &QFontSet::menuBarFont() const
{
  return m_menuBarFont;
}

/*!
 * \brief Sets the menu bar font.
 *
 * \param font the menu bar font
 */
void QFontSet::setMenuBarFont(const QFont &font)
{
  m_menuBarFont = font;
}

/*!
 * \brief Returns the text font.
 *
 * \return the text font
 */
const QFont &QFontSet::textFont() const
{
  return m_textFont;
}

/*!
 * \brief Sets the text font.
 *
 * \param font the text font
 */
void QFontSet::setTextFont(const QFont &font)
{
  m_textFont = font;
}

/*!
 * \brief Returns the tool tip font.
 *
 * \return the tool tip font
 */
const QFont &QFontSet::toolTipFont() const
{
  return m_toolTipFont;
}

/*!
 * \brief Sets the tool tip font.
 *
 * \param font the tool tip font
 */
void QFontSet::setToolTipFont(const QFont &font)
{
  m_toolTipFont = font;
}
